<template>
    <div>
        <h1 style="text-align: center">欢迎使用阳光医院系统</h1>
    </div>
</template>

<script>
import {ElMessage} from "element-plus";

export default {
    name: "dashboard",
    data(){
        return{
            name:'',
            avatar:'',
            type:'',
        }
    },
    activated(){
        this.create();
    },
    methods:{
        create(){
            this.name=localStorage.getItem("name");
            this.type=localStorage.getItem("typess");
            this.avatar=localStorage.getItem("avatar");
            if(this.type=='doctor'&&this.avatar=='null'){
                ElMessage.success("请尽快上传头像!");

                this.$router.push('/user')
            }
            if(this.name==''||this.name=='null')
            {
                ElMessage.success("请完善信息后再进行操作!");
                this.$router.push('/patientuser');
            }
        }
    }
}

</script>

<style scoped>

</style>
